<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>岩溶隧道智能监测系统</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/5.5.0/echarts.min.js"></script>
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#4A90E2',
                        secondary: '#50E3C2'
                    },
                    borderRadius: {
                        'none': '0px',
                        'sm': '2px',
                        DEFAULT: '4px',
                        'md': '8px',
                        'lg': '12px',
                        'xl': '16px',
                        '2xl': '20px',
                        '3xl': '24px',
                        'full': '9999px',
                        'button': '4px'
                    }
                }
            }
        }
    </script>
    <style>
        body {
            min-height: 1024px;
            background: #ffffff;
            color: #333333;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }

        .chart-container {
            background: #ffffff;
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            height: 300px;
            width: 100%;
        }
    </style>
</head>

<body class="p-6">
    <div class="max-w-[1440px] mx-auto">
        <header class="flex justify-between items-center mb-6">
            <div>
                <h1 class="text-2xl font-bold">数据分析看板</h1>
                <p class="text-sm text-gray-600">更新时间：2023-12-28 16:30</p>
            </div>
            <div class="text-right">
                <a href="./index1.html">返回</a>
            </div>
        </header>
        <div class="grid grid-cols-3 gap-6">
            <!-- 饼图 -->
            <div class="chart-container" id="pieChart"></div>
            <!-- 指标进度条 -->
            <div class="chart-container"><a href="./suidao.html"><img src="https://pic1.imgdb.cn/item/67a62b54d0e0a243d4fca441.png" alt=""></a></div>
            <!-- 柱状图 -->
            <div class="chart-container" id="barChart"></div>
            <!-- 折线图 -->
            <div class="chart-container" id="lineChart"></div>
            <!-- 堆积条形图 -->
            <div class="chart-container" id="stackedBarChart"></div>
            <!-- 雷达图 -->
            <div class="chart-container" id="radarChart"></div>
          
        </div>
    </div>
    <script>
        // 饼图
        const pieChart = echarts.init(document.getElementById('pieChart'));
        pieChart.setOption({
            animation: false,
            title: {
                text: '数据分布',
                textStyle: {
                    fontSize: 14,
                    backgroundColor: '#f0f5ff'
                },
                left: 'center',
                padding: [5, 10]
            },
            tooltip: {
                trigger: 'item'
            },
            legend: {
                orient: 'vertical',
                right: 10,
                top: 'center'
            },
            series: [{
                type: 'pie',
                radius: ['50%', '70%'],
                data: [
                    { value: 735, name: '地址数据' },
                    { value: 580, name: '变形数据' },
                    { value: 484, name: '压力数据' },
                    { value: 694, name: '水文数据' },
                    { value: 210, name: '环境数据' },
                    { value: 1328, name: '施工数据数据' },
                    { value: 22, name: '预警数据' },
                    { value: 36, name: '其他数据' }
                ],
                emphasis: {
                    itemStyle: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }]
        });
        // 柱状图
        const barChart = echarts.init(document.getElementById('barChart'));
        barChart.setOption({
            animation: false,
            title: {
                text: '气体数据对比%',
                textStyle: {
                    fontSize: 14,
                    backgroundColor: '#f0f5ff'
                },
                padding: [5, 10]
            },
            tooltip: {
                trigger: 'axis'
            },
            xAxis: {
                type: 'category',
                data: ['二氧化碳', '一氧化碳', '甲烷', '丙烯','二氧化硫','硫化氢','稀有气体']
            },
            yAxis: {
                type: 'value'
            },
            series: [{
                data: [44, 12, 8, 9,17,9,1],
                type: 'bar',
                barWidth: '30%',
                itemStyle: {
                    color: '#4A90E2'
                }
            }]
        });
        // 折线图
        const lineChart = echarts.init(document.getElementById('lineChart'));
        lineChart.setOption({
            animation: false,
            title: {
                text: '24小时趋势车流量',
                textStyle: {
                    fontSize: 14,
                    backgroundColor: '#f0f5ff'
                },
                padding: [5, 10]
            },
            tooltip: {
                trigger: 'axis'
            },
            xAxis: {
                type: 'category',
                data: ['00:00','03:00', '06:00','09:00', '12:00','15:00', '18:00', '21:00']
            },
            yAxis: {
                type: 'value'
            },
            series: [{
                data: [2310, 462, 2894, 5200,7891,3207,6408, 2650],
                type: 'line',
                smooth: true
            }]
        });
        // 堆积条形图
        const stackedBarChart = echarts.init(document.getElementById('stackedBarChart'));
        stackedBarChart.setOption({
            animation: false,
            title: {
                text: '季度关键数据对比',
                textStyle: {
                    fontSize: 14,
                    backgroundColor: '#f0f5ff'
                },
                padding: [5, 10]
            },
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                    type: 'shadow'
                }
            },
            legend: {
                data: ['岩溶率', '车辆流', '降雨量']
            },
            xAxis: {
                type: 'value'
            },
            yAxis: {
                type: 'category',
                data: ['四季度', '三季度', '二季度', '一季度']
            },
            series: [
                {
                    name: '岩溶率',
                    type: 'bar',
                    stack: 'total',
                    data: [320, 302, 301, 334]
                },
                {
                    name: '车辆流',
                    type: 'bar',
                    stack: 'total',
                    data: [120, 132, 101, 134]
                },
                {
                    name: '降雨量',
                    type: 'bar',
                    stack: 'total',
                    data: [220, 182, 191, 234]
                }
            ]
        });
        // 雷达图
        const radarChart = echarts.init(document.getElementById('radarChart'));
        radarChart.setOption({
            animation: false,
            title: {
                text: '多维度分析',
                textStyle: {
                    fontSize: 14,
                    backgroundColor: '#f0f5ff'
                },
                padding: [5, 10]
            },
            radar: {
                indicator: [
                    { name: '地址', max: 100 },
                    { name: '变形', max: 100 },
                    { name: '压力', max: 100 },
                    { name: '水文', max: 100 },
                    { name: '施工', max: 100 },
                    { name: '预警', max: 100 },
                    { name: '其他', max: 100 }
                ]
            },
            series: [{
                type: 'radar',
                data: [{
                    value: [85, 77, 65, 88, 90,70,86],
                    name: '综合评分'
                }]
            }]
        });
        // 响应式调整
        window.addEventListener('resize', function () {
            pieChart.resize();
            barChart.resize();
            lineChart.resize();
            stackedBarChart.resize();
            radarChart.resize();
        });
    </script>
</body>

</html>